package com.kcsj.demo.Mapper;

import com.kcsj.demo.Module.Product;
import com.kcsj.demo.Module.Supplier;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SupplierMapper {
    @Insert("insert into supplier_inf(name,company,telephone_number) values(#{name},#{company},#{telephoneNumber})")
    public void insert(Supplier supplier);

    @Select("select * from supplier_inf")
    List<Supplier> list();

    @Delete("delete from supplier_inf where name=#{name}")
    public void delete(String name);
}
